﻿using MiniExcelLibs.Attributes;

namespace ZR.Model;

public class BaseModel
{
    [SugarColumn(IsOnlyIgnoreUpdate = true)]
    [JsonProperty(propertyName: "CreateBy")]
    [ExcelIgnore]
    public long CreateBy { get; set; }
    
    [SugarColumn(IsOnlyIgnoreUpdate = true)]
    [JsonProperty(propertyName: "CreateName")]
    [ExcelIgnore]
    public string CreateName { get; set; }
    
    [SugarColumn(IsOnlyIgnoreUpdate = true)]
    [JsonProperty(propertyName: "CreateTime")]
    [ExcelColumn(Format = "yyyy-MM-dd HH:mm:ss")]
    public DateTime CreateTime { get; set; } = DateTime.Now;
    
    [SugarColumn(IsOnlyIgnoreInsert = true)]
    [JsonProperty(propertyName: "UpdateBy")]
    [ExcelIgnore]
    public long UpdateBy { get; set; }
    
    [SugarColumn(IsOnlyIgnoreInsert = true)]
    [JsonProperty(propertyName: "UpdateName")]
    [ExcelIgnore]
    public string UpdateName { get; set; }
    
    [SugarColumn(IsOnlyIgnoreInsert = true, IsNullable = true)]
    [JsonProperty(propertyName: "UpdateTime")]
    [ExcelIgnore]
    public DateTime? UpdateTime { get; set; }
    
}